import Vue from 'vue'
import App from './App.vue'
import router from './router'
import axios from 'axios'
import VueAxios from 'vue-axios'
import store from './store'
import 'lib-flexible/flexible'
import { Button, Tabbar, TabbarItem, Swipe, SwipeItem, Lazyload, Icon, List, NavBar, Popup, Form, Field, PullRefresh } from 'vant';

Vue.use(Button)
Vue.use(Tabbar);
Vue.use(TabbarItem);
Vue.use(Swipe);
Vue.use(SwipeItem);
Vue.use(Icon);
Vue.use(List);
Vue.use(NavBar);
Vue.use(Popup);
Vue.use(Form);
Vue.use(Field);
Vue.use(PullRefresh);
Vue.use(Lazyload);
Vue.use(VueAxios, axios)
Vue.config.productionTip = false
axios.defaults.baseURL = "https://apis.netstart.cn/mbcomic";
let aid
let bid
let cid
let did
let eid
store.state.isLoad = true
axios.interceptors.response.use(function (response) {
  // console.log('response==>',response);
  store.state.isLoad = true
  setTimeout(() => {
    store.state.isLoad = false
  }, 3000)
  return response;
}, function (err) {
  setTimeout(() => {
    store.state.isLoad = false
  }, 3000)
  return Promise.reject(err)
})
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
